package com.core.framework.tools;

import java.util.Properties;
/**
 * config.properties  文件操作类
 * @author 刘涛
 * @since Jun 19, 2012
 */
public class Config {
	static final String propertyFileName = "config.properties" ;
	static final Properties p = PropertiesLoader.getProperties(propertyFileName);
	public static String getProString(String key)
	{
			return PropertiesLoader.getStringProperty(p, key, "");
	}
	public static String getProString(String key,String defaultValue)
	{
			return PropertiesLoader.getStringProperty(p, key, defaultValue);
	}
	public static Integer getProInteger(String key )
	{	
			return PropertiesLoader.getIntegerProperty(p, key, 0);
	}
	public static Integer getProInteger(String key , Integer defaultValue )
	{	
			return PropertiesLoader.getIntegerProperty(p, key, defaultValue);
	}
	public static boolean getProBoolean(String key )
	{
		return PropertiesLoader.getBooleanProperty(p, key, true);
	}
	public static boolean getProBoolean(String key , boolean defaultValue)
	{
		return PropertiesLoader.getBooleanProperty(p, key, defaultValue);
	}
	
}
